package com.trkj.pojos;

import java.io.Serializable;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;


/**
 * The persistent class for the LIVEINRECORD_TABLE database table.
 * 
 */
@Entity
@Table(name="LIVEINRECORD_TABLE")
@NamedQuery(name="LiveinrecordTable.findAll", query="SELECT l FROM LiveinrecordTable l")
public class LiveinrecordTable implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private String liveid8;

	private String familyname;

	private String familyrelation;

	private String familytel;

	private String idcard;

	@Temporal(TemporalType.DATE)
	private Date livedate;

	private String livenoticid3;

	private String liveoffice4;

	private String livestatus;

	private String livetypename;

	private String mjdoctorname;

	private String mjnumber3;

	private BigDecimal patientage;

	private String patientloc;

	private String patientname8;

	private String patientsex;

	private String patienttel;

	//bi-directional many-to-one association to HospWorkInErx
	@OneToMany(mappedBy="liveinrecordTable")
	private List<HospWorkInErx> hospWorkInErxs;

	//bi-directional many-to-one association to BedTable
	@ManyToOne
	@JoinColumn(name="BEDID")
	private BedTable bedTable;

	//bi-directional many-to-one association to Card
	@ManyToOne
	@JoinColumn(name="CRAD_ID")
	private Card card;

	//bi-directional many-to-one association to Staff
	@ManyToOne
	@JoinColumn(name="STAFF_ID")
	private Staff staff;

	//bi-directional many-to-one association to PayTable
	@OneToMany(mappedBy="liveinrecordTable")
	private List<PayTable> payTables;

	//bi-directional many-to-one association to TallyTable
	@OneToMany(mappedBy="liveinrecordTable")
	private List<TallyTable> tallyTables;

	//bi-directional many-to-one association to VisitTable
	@OneToMany(mappedBy="liveinrecordTable")
	private List<VisitTable> visitTables;

	public LiveinrecordTable() {
	}

	public String getLiveid8() {
		return this.liveid8;
	}

	public void setLiveid8(String liveid8) {
		this.liveid8 = liveid8;
	}

	public String getFamilyname() {
		return this.familyname;
	}

	public void setFamilyname(String familyname) {
		this.familyname = familyname;
	}

	public String getFamilyrelation() {
		return this.familyrelation;
	}

	public void setFamilyrelation(String familyrelation) {
		this.familyrelation = familyrelation;
	}

	public String getFamilytel() {
		return this.familytel;
	}

	public void setFamilytel(String familytel) {
		this.familytel = familytel;
	}

	public String getIdcard() {
		return this.idcard;
	}

	public void setIdcard(String idcard) {
		this.idcard = idcard;
	}

	public Date getLivedate() {
		return this.livedate;
	}

	public void setLivedate(Date livedate) {
		this.livedate = livedate;
	}

	public String getLivenoticid3() {
		return this.livenoticid3;
	}

	public void setLivenoticid3(String livenoticid3) {
		this.livenoticid3 = livenoticid3;
	}

	public String getLiveoffice4() {
		return this.liveoffice4;
	}

	public void setLiveoffice4(String liveoffice4) {
		this.liveoffice4 = liveoffice4;
	}

	public String getLivestatus() {
		return this.livestatus;
	}

	public void setLivestatus(String livestatus) {
		this.livestatus = livestatus;
	}

	public String getLivetypename() {
		return this.livetypename;
	}

	public void setLivetypename(String livetypename) {
		this.livetypename = livetypename;
	}

	public String getMjdoctorname() {
		return this.mjdoctorname;
	}

	public void setMjdoctorname(String mjdoctorname) {
		this.mjdoctorname = mjdoctorname;
	}

	public String getMjnumber3() {
		return this.mjnumber3;
	}

	public void setMjnumber3(String mjnumber3) {
		this.mjnumber3 = mjnumber3;
	}

	public BigDecimal getPatientage() {
		return this.patientage;
	}

	public void setPatientage(BigDecimal patientage) {
		this.patientage = patientage;
	}

	public String getPatientloc() {
		return this.patientloc;
	}

	public void setPatientloc(String patientloc) {
		this.patientloc = patientloc;
	}

	public String getPatientname8() {
		return this.patientname8;
	}

	public void setPatientname8(String patientname8) {
		this.patientname8 = patientname8;
	}

	public String getPatientsex() {
		return this.patientsex;
	}

	public void setPatientsex(String patientsex) {
		this.patientsex = patientsex;
	}

	public String getPatienttel() {
		return this.patienttel;
	}

	public void setPatienttel(String patienttel) {
		this.patienttel = patienttel;
	}

	public List<HospWorkInErx> getHospWorkInErxs() {
		return this.hospWorkInErxs;
	}

	public void setHospWorkInErxs(List<HospWorkInErx> hospWorkInErxs) {
		this.hospWorkInErxs = hospWorkInErxs;
	}

	public HospWorkInErx addHospWorkInErx(HospWorkInErx hospWorkInErx) {
		getHospWorkInErxs().add(hospWorkInErx);
		hospWorkInErx.setLiveinrecordTable(this);

		return hospWorkInErx;
	}

	public HospWorkInErx removeHospWorkInErx(HospWorkInErx hospWorkInErx) {
		getHospWorkInErxs().remove(hospWorkInErx);
		hospWorkInErx.setLiveinrecordTable(null);

		return hospWorkInErx;
	}

	public BedTable getBedTable() {
		return this.bedTable;
	}

	public void setBedTable(BedTable bedTable) {
		this.bedTable = bedTable;
	}

	public Card getCard() {
		return this.card;
	}

	public void setCard(Card card) {
		this.card = card;
	}

	public Staff getStaff() {
		return this.staff;
	}

	public void setStaff(Staff staff) {
		this.staff = staff;
	}

	public List<PayTable> getPayTables() {
		return this.payTables;
	}

	public void setPayTables(List<PayTable> payTables) {
		this.payTables = payTables;
	}

	public PayTable addPayTable(PayTable payTable) {
		getPayTables().add(payTable);
		payTable.setLiveinrecordTable(this);

		return payTable;
	}

	public PayTable removePayTable(PayTable payTable) {
		getPayTables().remove(payTable);
		payTable.setLiveinrecordTable(null);

		return payTable;
	}

	public List<TallyTable> getTallyTables() {
		return this.tallyTables;
	}

	public void setTallyTables(List<TallyTable> tallyTables) {
		this.tallyTables = tallyTables;
	}

	public TallyTable addTallyTable(TallyTable tallyTable) {
		getTallyTables().add(tallyTable);
		tallyTable.setLiveinrecordTable(this);

		return tallyTable;
	}

	public TallyTable removeTallyTable(TallyTable tallyTable) {
		getTallyTables().remove(tallyTable);
		tallyTable.setLiveinrecordTable(null);

		return tallyTable;
	}

	public List<VisitTable> getVisitTables() {
		return this.visitTables;
	}

	public void setVisitTables(List<VisitTable> visitTables) {
		this.visitTables = visitTables;
	}

	public VisitTable addVisitTable(VisitTable visitTable) {
		getVisitTables().add(visitTable);
		visitTable.setLiveinrecordTable(this);

		return visitTable;
	}

	public VisitTable removeVisitTable(VisitTable visitTable) {
		getVisitTables().remove(visitTable);
		visitTable.setLiveinrecordTable(null);

		return visitTable;
	}

}